package com.example.village.dao;

import com.example.village.entity.UserEntity;
import com.example.village.entityVO.UserDimVO;
import com.example.village.entityVO.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface UserDao {

    UserEntity login(@Param("username") String username, @Param("password") String password);

    int register(UserEntity userEntity);

    List<UserEntity> queryByDim(UserDimVO userDimVO);

    List<UserEntity> queryByParam(UserEntity userEntity);

    int update(UserEntity userEntity);

    int delete(Integer id);

    int deleteMore(@Param("ids") List<Integer> ids);

    List<UserVO> querySelect();

    UserEntity queryById(@Param("id") Integer id);

    Integer queryCount(UserEntity userEntity);
}
